package wkj.yuyanjichu;

import com.sun.org.apache.xalan.internal.xsltc.trax.XSLTCSource;

import java.util.Scanner;

public class jiuyue6 {
    public static void main(String[] args) {
        System.out.println("猜吧");
        int num = (int)(Math.random()*100+1);
        Scanner scanner = new Scanner(System.in);
        int guess = scanner.nextInt();
        while (guess!=num){
            if (guess>num){
                System.out.println("猜大了");
            }else{
                System.out.println("猜小了");
            }
            System.out.println("猜吧");
            guess = scanner.nextInt();
        }
        System.out.println("猜对了");

//        int guess;
//        do {
//            guess = scanner.nextInt();
//            if (guess>num){
//                System.out.println("猜大了");
//            }else if (guess<num){
//                System.out.println("猜小了");
//            }else {
//                System.out.println("猜对了");
//            }
//        }while (guess!=num);
    }
}
